<template>
  <router-link :to="'/product/' + product.pro_no">
    <section class="product-container">
      <img class="product-pic" width="50" :src="product.img" />
      <span class="product-name">{{ product.title }}</span>
    </section>
  </router-link>
</template>
<script setup lang="ts">

let props = defineProps({
  product: Object,
});
let product = props.product || {};
</script>
<style scoped>
.product-container {
  display: flex;
  align-items: center;
  width: 240px;
  height: 90px;
  transition: 0.3s ease all;
}

.product-container:hover {
  cursor: pointer;
  color: #18a058aa;
}
.product-pic {
  width: 50px;
  height: 50px;
}

.product-name {
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  margin-left: 5px;
}
</style>